package com.ftg.learn.chapter17.expand;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @author KangJx
 * @date 2021/8/16
 */

/**
 * 为了帮我们生成相应属性的setter/getter
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class Student implements Comparable<String>{

    private String sname;

    private String sex;

    private int age;

    @Override
    public int compareTo(String o) {
        return this.getSname().compareTo(o);
    }
}
